package com.dmx.cep.action.serviceManage;

import com.dmx.cep.service.ServiceMonitorService;
import com.dmx.fw.constant.ViewConstant;
import com.dmx.fw.web.struts2.action.CommonQueryAction;





/**
 *
 * @author Alex.lu
 *
 */
@SuppressWarnings("serial")
public class TvAssertStatusMonitorAction extends CommonQueryAction {

    private static final String BATCH_RECOVER = "batchRecover";
	private ServiceMonitorService serviceMonitorService;
	private String[] ids;

	private String q_assetId;
    private String q_title;
	private String q_assetStatus;
    private String q_transcodeStatus;
    private String q_analysisStatus;
	private String q_startDate;
	private String q_endDate;
    private String q_captionStatus;
    private String q_contentId;
    private String q_digestStatus;
    private String q_imageStatus;
    private String q_publishStatus;
    private String q_monitorFlash;



	// actions begin

	public String execute() throws Exception {
		super.busiId = "searchTVserviceMonitor";
		if(super.sortField==null||"".equals(super.sortField)){
			super.sortField="t.start_time";
			super.sortMode="desc";
		}
		if (ViewConstant.QUERY.equals(super.act)) {
			doQuery();
		} else if (ViewConstant.REQUERY.equals(super.act)) {
			doReQuery();
		}else if (BATCH_RECOVER.equals(super.act)) {
			doBatchRecover();
		}else{
			super.execute();
		}
		return SUCCESS;
	}

	public String doBatchRecover() throws Exception {
		if(ids!=null){
			serviceMonitorService.recoverTVContentInfosStatus(ids);
		}
		return super.doReQuery();
	}




	// actions end

	// getters and setters begin





	



	public String getQ_captionStatus() {
		return this.q_captionStatus;
	}

	public void setQ_captionStatus(String captionStatus) {
		this.q_captionStatus = captionStatus;
	}
	public String getQ_contentId() {
		return this.q_contentId;
	}

	public void setQ_contentId(String contentId) {
		this.q_contentId = contentId;
	}

	public String getQ_digestStatus() {
		return this.q_digestStatus;
	}

	public void setQ_digestStatus(String digestStatus) {
		this.q_digestStatus = digestStatus;
	}
	public String getQ_imageStatus() {
		return this.q_imageStatus;
	}

	public void setQ_imageStatus(String imageStatus) {
		this.q_imageStatus = imageStatus;
	}

	public String getQ_publishStatus() {
		return this.q_publishStatus;
	}

	public void setQ_publishStatus(String publishStatus) {
		this.q_publishStatus = publishStatus;
	}


	public String getQ_startDate() {
		return q_startDate;
	}

	public void setQ_startDate(String date) {
		q_startDate = date;
	}

	public String getQ_endDate() {
		return q_endDate;
	}

	public void setQ_endDate(String date) {
		q_endDate = date;
	}
	
    public String getQ_title() {
		return q_title;
	}

	public void setQ_title(String q_title) {
		this.q_title = q_title;
	}

	public String getQ_assetStatus() {
		return q_assetStatus;
	}

	public void setQ_assetStatus(String status) {
		q_assetStatus = status;
	}

	public String getQ_transcodeStatus() {
		return q_transcodeStatus;
	}

	public void setQ_transcodeStatus(String status) {
		q_transcodeStatus = status;
	}

	public String getQ_analysisStatus() {
		return q_analysisStatus;
	}

	public void setQ_analysisStatus(String status) {
		q_analysisStatus = status;
	}
	
	
	
	public void setServiceMonitorService(ServiceMonitorService serviceMonitorService) {
		this.serviceMonitorService = serviceMonitorService;
	}

	public void setIds(String[] ids) {
		this.ids = ids;
	}

	public String[] getIds() {
		return ids;
	}

	public void setQ_monitorFlash(String q_monitorFlash) {
		this.q_monitorFlash = q_monitorFlash;
	}

	public String getQ_monitorFlash() {
		return q_monitorFlash;
	}

	public String getQ_assetId() {
		return q_assetId;
	}

	public void setQ_assetId(String id) {
		q_assetId = id;
	}

	
	
	
	// getters and setters end






}